home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / StormC_demo / StormC Install-Script english < prev    next >
Text File  |  1997-01-07  |  17KB  |  811 lines

  1. ; $VER: StormC V2.0 Install Version 1.07 (07.01.97)
  2.  
  3. ; Installations-Script
  4.  
  5. ; (c) 1997 HAAGE & PARTNER Computer GmbH
  6.  
  7.  
  8.  
  9. (complete 0)
  10.  
  11.  
  12.  
  13. ; Die Versionsnummer und das Erstellungs-Datum der hier installierten
  14.  
  15. ; Versionen.
  16.  
  17.  
  18.  
  19. (set stcpp-version "2.0")
  20.  
  21. (set stcpp-date "(7 Dec 96)")
  22.  
  23.  
  24.  
  25. ;====================================================================
  26.  
  27. ; Initialisierungen
  28.  
  29.  
  30.  
  31.  
  32.  
  33. (set @default-dest "")
  34.  
  35.  
  36.  
  37. (set os-version (/ (getversion) 65536))
  38.  
  39. (set os-13 (< os-version 36))
  40.  
  41. (set os-20 (>= os-version 36))
  42.  
  43. (set os-21 (>= os-version 38))
  44.  
  45.  
  46.  
  47. (set totalmem (database "total-mem")) ; Diese schöne Funktion vereinfacht einiges
  48.  
  49.  
  50.  
  51. ; Die Pfadnamen der Programme, die vom Installations-Skript aufgerufen werden.
  52.  
  53.  
  54.  
  55. ; Die Pfadnamen der einzelnen Quell-Dateien.
  56.  
  57.  
  58.  
  59. (set #binsource                         (tackon (pathonly @icon) "StormSYS"))   ; Hier stehen die Ausführbaren Programme
  60. (set #includesource             (tackon (pathonly @icon) "INCLUDE"))    ; Hier stehen die Includes
  61. (set #envsource                 (tackon (pathonly @icon) "ENV"))                        ; Die Voreinstellungen
  62. (set #libsource                 (tackon (pathonly @icon) "LIB"))                        ; Hier stehen die Bibliotheken
  63. (set #wizlib                    (tackon (pathonly @icon) "LIBS/Wizard.library")); Hier steht die Bibliohtek
  64. (set #samplesource              (tackon (pathonly @icon) "Examples"))   ; Hier stehen die Demo-Sourcen
  65. (set #manualsource              (tackon (pathonly @icon) "MANUAL"))             ; Hier steht die Dokumentation
  66. (set #toolssource       (tackon (pathonly @icon) "TOOLS"))              ; Hier stehen die Tools
  67. (set #rexxsource        (tackon (pathonly @icon) "Rexx"))               ; Hier stehen die neuen Makescripts
  68. ;(set #flibsource        (tackon (pathonly @icon) "Fast-Ansi-Lib")) ; Hier steht die neue Ansi-lib
  69. ;(set #muilibsource      (tackon (pathonly @icon) "Mui-Class-Lib")) ; Hier steht die Mui Klassen-Library
  70. (set source-Liesmich    (tackon (pathonly @icon) "Readme"))             ; Die Liesmich Datei
  71. (set source-readme         (tackon (pathonly @icon) "Readme"))          ; Die Liesmich Datei
  72. (set source-italreadme  (tackon (pathonly @icon) "Leggimi"))            ; Die Liesmich Datei
  73. (set source-ikon                (tackon (pathonly @icon) "StormCPP.info"))      ; Das Programm-Piktogramm
  74.  
  75.  
  76. (set #prp-copy-samples
  77.         "Copying C and C++ examples...")
  78.  
  79. (set #hlp-copy-samples
  80.         "Use the manual and the examples to get a quick start with StormC")
  81.  
  82. (set #prp-copy-env
  83.         "Copying the StormC default icons...")
  84.  
  85. (set #hlp-copy-env
  86.         "The icons are used by the project management and by the editor")
  87.  
  88. (set #prp-copy-includes
  89.         "Copying the C++ includes...")
  90.  
  91. (set #hlp-copy-includes
  92.         "The includes are needed by the preprocessor of the compiler")
  93.  
  94. (set #prp-copy-libs
  95.         "Copying the linker libraries...")
  96.  
  97. (set #hlp-copy-libs
  98.         "These libraries are used by the linker")
  99.  
  100. (set #prp-copy-manual
  101.         "Copying the documentation...")
  102.  
  103. (set #hlp-copy-manual
  104.         "This is an Amiga Guide file for StormC")
  105.  
  106. (set #prp-copy-bin
  107.         "Copying the executables of StormC...")
  108.  
  109. (set #hlp-copy-bin
  110.         "If this is your first time insatallation of StormC, you should copy everything!")
  111.  
  112. (set #prp-copy-tools
  113.         "Copying the Screentool...")
  114.  
  115. (set #hlp-copy-tools
  116.         "This is an Screenmanager-Commodity for StormC")
  117.  
  118. (set #prp-copy-wizlib
  119.    "Copying the Wizard.Library")
  120.  
  121. (set #hlp-copy-wizlib
  122.    "The Library makes very short programms!")
  123.  
  124. (set #prp-copy-fastlib
  125.    "Copying the FAST-ANSI-Library")
  126.  
  127. (set #hlp-copy-fastlib
  128.    "With it you can generate fast ANSI-C programms.")
  129.  
  130. (set #prp-copy-muilib
  131.    "Copying the Mui Klassen-Library")
  132.  
  133. (set #hlp-copy-muilib
  134.    "The library makes it possible to program MUI with C++")
  135.  
  136.  
  137. ; Die Dateigroessen
  138.  
  139. (set size-stormcpp                      24000)
  140. (set size-stormc                                437000)
  141. (set size-stormed                               210000)
  142. (set size-stormshell                    340000)
  143. (set size-stormrun                      220000)
  144. (set size-stormasm                      36000)
  145. (set size-stormpics                     50000)
  146. (set size-stormlex                      100000)
  147. (set size-libs                                  520000)
  148. (set size-inlcudes                      270000)
  149. (set size-demos                         70000)
  150.  
  151. (set size-komplett      ( + size-stormrun size-stormasm size-stormcpp size-stormc size-stormed size-stormshell size-stormpics size-stormlex size-libs size-inlcudes size-demos))
  152.  
  153.  
  154.  
  155. ; ----------------------------- Prozeduren ------------------------------
  156.  
  157.  
  158.  
  159. (Procedure Make_Folder
  160.  
  161.     (
  162.  
  163.     (set folder (tackon folder "StormC"))
  164.  
  165.     (if (= (exists folder) 0)
  166.  
  167.        (
  168.  
  169.        (makedir folder (infos))
  170.  
  171.        )
  172.  
  173.     ))
  174.  
  175. )
  176.  
  177.  
  178.  
  179. ;=====================================================================================
  180.  
  181. ; Beginn der Installation
  182.  
  183. ;=====================================================================================
  184.  
  185.  
  186.  
  187. ; Eine kleine Einleitung, gefolgt vom Startbild des Installers.
  188.  
  189.  
  190.  
  191. (set act-user-level @user-level)
  192.  
  193. (user 1)
  194.  
  195.  
  196.  
  197. (message (cat   "\nWelcome to the installation of the \n\n\"StormC demo "
  198.  
  199.                                          stcpp-version " of the "stcpp-date "\"!\n\n"
  200.  
  201.                                         "This script copies the files needed by StormC "
  202.  
  203.                                         "to your harddisk.\n"))
  204.  
  205.  
  206.  
  207. (user act-user-level)
  208.  
  209. (welcome)
  210.  
  211.  
  212.  
  213. (complete 5)
  214.  
  215.  
  216.  
  217. (set act-user-level @user-level)
  218.  
  219. (user 1)
  220.  
  221.  
  222.  
  223.  
  224.  
  225. ;       Alte Version pruefen und entsprechende Warnung ausgeben! **************************************************************
  226.  
  227.  
  228.  
  229. (set folder "WORK:StormC")
  230.  
  231.  
  232.  
  233. (if (exists "StormC:" (noreq))
  234.  
  235.         (
  236.  
  237.                 (message (cat   "\nThere is already and installation of StormC\n"
  238.  
  239.                                                 "on your harddisk! Please select the parent\n"
  240.  
  241.                                                 "directory or the volume if you want to update\n"
  242.  
  243.                                                 "your old StormC installation!"))
  244.  
  245.  
  246.  
  247.         (set folder (getassign "STORMC"))
  248.  
  249.         )
  250.  
  251. )
  252.  
  253.  
  254.  
  255. (set cmpstr (getassign "STORMC"))
  256.  
  257.  
  258.  
  259. (user act-user-level)
  260.  
  261.  
  262.  
  263. (if (= @user-level 0)
  264.  
  265.         (
  266.  
  267.         (user 1)
  268.  
  269.         (message (cat   "The ENTRY mode needs a minimum of 5 MB of free harddisk space."
  270.  
  271.                                                 "Please select a drawer/volume for your StormC installation"
  272.  
  273.                                                 "\n\n"
  274.  
  275.                                                 "All other settings will be done by the installation "
  276.  
  277.                                                 "script to fit your system."))))
  278.  
  279.  
  280.  
  281. (set ok 0)
  282.  
  283. (while (not ok)
  284.  
  285.         (set folder
  286.  
  287.                 (askdir
  288.  
  289.                         (prompt (cat "\n"
  290.  
  291.                                                          "Select a path for your StormC installation.\n"
  292.  
  293.                                                          "A drawer named StormC will be created!"))
  294.  
  295.                         (help (cat      "    You will get an overview of all volumes with 'Show drives' "
  296.  
  297.                                                         "Form this list you should select the first, non colored, items. "
  298.  
  299.                                                         "only\n"
  300.  
  301.                                                         "    Typical names are \"WORK:\", \"HD0:\" or \"DH0:\"; "
  302.  
  303.                                                         "do not use such names as \"DF0:\", \"DF1:\", "
  304.  
  305.                                                         "\"DF2:\", \"DF3:\", \"RAD:\", \"RAM:\", \"System2.0:\", "
  306.  
  307.                                                         "\"WB_2.x:\", \"System3.0:\" or \"WB_3.x:\"!"
  308.  
  309.                                                         "\n\n"
  310.  
  311.                                                         "The Storm C installation can not be placed on a volume directly. "
  312.  
  313.                                                         "You have to select a drawer. Ohterwise an error will be shown. "
  314.  
  315.                                                         "\n\n"
  316.  
  317.                                                         @askdir-help))
  318.  
  319.                         (default folder)
  320.  
  321.                         (disk)
  322.  
  323.                 )
  324.  
  325.         )
  326.  
  327.  
  328.  
  329.    (Make_Folder)    ; // Automatisch neues Verzeichnis anlegen!
  330.  
  331.  
  332.  
  333.         ; Ist der Dateiname leer oder endet mit einem ':' oder existiert unter
  334.  
  335.         ; diesem Namen kein Verzeichnis, wird eine Fehlermeldung angezeigt; andernfalls
  336.  
  337.         ; kann die Auswahl-Schleife beendet werden.
  338.  
  339.         (if (or (or (or (<= (strlen folder) 0) (= (substr folder (- (strlen folder) 1) 1) ":")) (= (exists folder (noreq)) 0)) (= (getdiskspace folder) -1))
  340.  
  341.                 (message (cat   "\nYour selection \"" folder "\" is not a valid "
  342.  
  343.                                                         "drawer !\n\n"
  344.  
  345.                                                         "Use 'Show drives' to get a list of all volumes. "
  346.  
  347.                                                         " Form this list you should only select the first, non color, items. "
  348.  
  349.                                                         "\n"
  350.  
  351.                                                         "Use \"New drawer...\" to create a new drawer on the current "
  352.  
  353.                                                         "volume."))
  354.  
  355.                 ;else
  356.  
  357.                 (
  358.  
  359.                         (set freediskspace (getdiskspace folder))       ; Der freie Speicher auf diesem Medium
  360.  
  361.  
  362.  
  363.                         (if (< freediskspace size-komplett)
  364.  
  365.                                 (
  366.  
  367.                                 (user 1)
  368.  
  369.                                 (message (cat   "\nThe is not enough free space on the volume you "
  370.  
  371.                                                                                         "selected for the complete installation of StormC. "
  372.  
  373.                                                                                         "\n\n"
  374.  
  375.                                                                                         "Free diskspace " freediskspace "!\n"
  376.  
  377.                                                                                         "diskspace needed " size-komplett "!\n\n"
  378.  
  379.                                                                                         "Please select another volume !"))
  380.  
  381.                                 )
  382.  
  383.                         ;else
  384.  
  385.                         (set ok 1)
  386.  
  387.                         )
  388.  
  389.                 )
  390.  
  391.         )
  392.  
  393. )
  394.  
  395.  
  396.  
  397. (makeassign "STORMC")
  398.  
  399.  
  400.  
  401. (user act-user-level)
  402.  
  403.  
  404.  
  405. (set @default-dest folder)      ; Die Zuweisung ist sehr wichtig!
  406.  
  407.  
  408.  
  409. (set destbin    (tackon folder "StormSYS"))
  410.  
  411. (if                                             ; Compiler-Verzeichnis erzeugen
  412.  
  413.         (= (exists destbin) 0)
  414.  
  415.         (makedir destbin (infos))
  416.  
  417. )
  418.  
  419.  
  420.  
  421. (set destdemo   (tackon folder "Examples"))
  422.  
  423. (if                                             ; Demo-Verzeichnis erzeugen
  424.  
  425.         (= (exists destdemo) 0)
  426.  
  427.         (makedir destdemo (infos))
  428.  
  429. )
  430.  
  431. (set destinclude (tackon folder "Include"))
  432.  
  433. (if                                             ; Includes-Verzeichnis erzeugen
  434.  
  435.         (= (exists destinclude) 0)
  436.  
  437.         (makedir destinclude)
  438.  
  439. )
  440.  
  441.  
  442.  
  443. (set destlib    (tackon folder "Lib"))
  444.  
  445. (if                                             ; Libraries-Verzeichnis erzeugen
  446.  
  447.         (= (exists destlib) 0)
  448.  
  449.         (makedir destlib)
  450.  
  451. )
  452.  
  453.  
  454.  
  455. (set destmanual (tackon folder "Manual"))
  456.  
  457. (if                                             ; Dokumentations-Verzeichnis erzeugen
  458.  
  459.         (= (exists destmanual) 0)
  460.  
  461.         (makedir destmanual (infos))
  462.  
  463. )
  464.  
  465. (set desttools  (tackon folder "Tools"))
  466.  
  467. (if                                             ; Tools-Verzeichnis erzeugen
  468.  
  469.         (= (exists desttools) 0)
  470.  
  471.         (makedir desttools (infos))
  472.  
  473. )
  474.  
  475. (set rexxscripts  (tackon folder "Rexx"))
  476.  
  477. (if                                            ;Fastansilib-Verzeichnis erzeugen
  478.        (= (exists rexxscripts) 0)
  479.        (makedir rexxscripts)
  480. )
  481.  
  482. (complete 5)
  483.  
  484.  
  485.  
  486. ; Liesmich Datei auf Festplatte kopieren!
  487.  
  488.  
  489. (copyfiles
  490.  
  491.         (source source-Liesmich)
  492.  
  493.         (dest folder)
  494.  
  495.         (infos)
  496.  
  497. )
  498.  
  499. (copyfiles
  500.         (source source-readme)
  501.         (dest folder)
  502.         (infos)
  503. )
  504.  
  505. (copyfiles
  506.         (source source-italreadme)
  507.         (dest folder)
  508.         (infos)
  509. )
  510.  
  511. (complete 8)
  512.  
  513.  
  514.  
  515. (set morerunpath "run C/More Readme")
  516.  
  517.  
  518.  
  519. (run morerunpath)       ; Liesmich laden
  520.  
  521.  
  522.  
  523. (complete 10)
  524.  
  525.  
  526.  
  527. (set destinfo   (tackon folder "StormCPP.info"))
  528.  
  529. (if                                             ; Projekt-Ikon erzeugen
  530.         (= (exists destinfo) 0)
  531.         (
  532.         (copyfiles
  533.                 (source source-ikon)
  534.                 (dest folder)
  535.         ))
  536. )
  537.  
  538.  
  539.  
  540. (complete 15)
  541.  
  542.  
  543.  
  544. (copyfiles                                                                                      ; Beispiele kopieren
  545.  
  546.         (prompt #prp-copy-samples)
  547.  
  548.         (help #hlp-copy-samples)
  549.  
  550.         (source #samplesource)
  551.  
  552.         (dest destdemo)
  553.  
  554.         (all)
  555.  
  556.         (confirm)
  557.  
  558. )
  559.  
  560.  
  561.  
  562. (complete 20)
  563.  
  564.  
  565.  
  566. (copyfiles                                                                                      ; Settings kopieren
  567.  
  568.         (prompt #prp-copy-env)
  569.  
  570.         (help #hlp-copy-env)
  571.  
  572.         (source #envsource)
  573.  
  574.         (dest "ENVARC:")
  575.  
  576.         (all)
  577.  
  578.         (confirm)
  579.  
  580. )
  581.  
  582.  
  583.  
  584. (complete 22)
  585.  
  586.  
  587.  
  588. (copyfiles                                                                                      ; Settings kopieren
  589.  
  590.         (prompt #prp-copy-env)
  591.  
  592.         (help #hlp-copy-env)
  593.  
  594.         (source #envsource)
  595.  
  596.         (dest "ENV:")
  597.  
  598.         (all)
  599.  
  600.         (confirm)
  601.  
  602. )
  603.  
  604.  
  605.  
  606. (complete 25)
  607.  
  608.  
  609.  
  610. (copyfiles                                                                                      ; Compiler kopieren
  611.  
  612.         (prompt #prp-copy-bin)
  613.  
  614.         (help #hlp-copy-bin)
  615.  
  616.         (source #binsource)
  617.  
  618.         (dest destbin)
  619.  
  620.         (all)
  621.  
  622.         (confirm)
  623.  
  624. )
  625.  
  626.  
  627.  
  628. (complete 40)
  629.  
  630.  
  631.  
  632. (copyfiles                                                                                      ; Includes kopieren
  633.  
  634.         (prompt #prp-copy-includes)
  635.  
  636.         (help #hlp-copy-includes)
  637.  
  638.         (source #includesource)
  639.  
  640.         (dest destinclude)
  641.  
  642.         (all)
  643.  
  644.         (confirm)
  645.  
  646. )
  647.  
  648.  
  649.  
  650. (complete 60)
  651.  
  652.  
  653.  
  654. (copyfiles                                                                                      ; Libs kopieren
  655.  
  656.         (prompt #prp-copy-libs)
  657.  
  658.         (help #hlp-copy-libs)
  659.  
  660.         (source #libsource)
  661.  
  662.         (dest destlib)
  663.  
  664.         (all)
  665.  
  666.         (confirm)
  667.  
  668. )
  669.  
  670.  
  671.  
  672. (complete 80)
  673.  
  674.  
  675.  
  676. (copyfiles                                                                                      ; Manual kopieren
  677.  
  678.         (prompt #prp-copy-manual)
  679.  
  680.         (help #hlp-copy-manual)
  681.  
  682.         (source #manualsource)
  683.  
  684.         (dest destmanual)
  685.  
  686.         (all)
  687.  
  688.         (confirm)
  689.  
  690. )
  691.  
  692. (complete 90)
  693.  
  694.  
  695.  
  696. (copyfiles                                                                                      ; Tools kopieren
  697.  
  698.         (prompt #prp-copy-tools)
  699.  
  700.         (help #hlp-copy-tools)
  701.  
  702.         (source #toolssource)
  703.  
  704.         (dest desttools)
  705.  
  706.         (all)
  707.  
  708.         (confirm)
  709.  
  710. )
  711.  
  712. (complete 91)
  713.  
  714.  
  715. (copyfiles                                                                                     ; Fastlib kopieren
  716.        (prompt #prp-copy-fastlib)
  717.        (help #hlp-copy-fastlib)
  718.        (source #rexxsource)
  719.        (dest rexxscripts)
  720.        (all)
  721.        (confirm)
  722. )
  723.  
  724. ;(complete 92)
  725.  
  726. ;(copyfiles                                                                                     ; Muilib kopieren
  727. ;       (prompt #prp-copy-muilib)
  728. ;       (help #hlp-copy-muilib)
  729. ;       (source #muilibsource)
  730. ;       (dest muilib)
  731. ;       (all)
  732. ;       (confirm)
  733. ;)
  734.  
  735. (complete 93)
  736.  
  737.  
  738. (copylib                                                                                        ; Wizard.library kopieren
  739.         (prompt #prp-copy-wizlib)
  740.         (help #hlp-copy-wizlib)
  741.         (source #wizlib)
  742.         (dest "LIBS:")
  743.         (confirm)
  744. )
  745.  
  746. (complete 96)
  747.  
  748.  
  749.  
  750. ; ------- STARTUP ÄNDERN
  751.  
  752.  
  753.  
  754. (set command1 (cat  "ASSIGN STORMC: " folder ""))
  755.  
  756.  
  757.  
  758. (set command1.txt
  759.  
  760.         (cat
  761.  
  762.                 "\n\n\nThere User-Startup must be changed to get StromC "
  763.  
  764.       "work right.\n\n"
  765.  
  766.                 command1
  767.  
  768.         )
  769.  
  770. )
  771.  
  772.  
  773.  
  774. (startup "StormC"
  775.  
  776.         (prompt command1.txt)
  777.  
  778.         (help #help-startup)
  779.  
  780.         (command command1)
  781.  
  782. )
  783.  
  784.  
  785.  
  786. (makeassign "STORMC")
  787.  
  788. (makeassign "STORMC" folder)
  789.  
  790.  
  791. (complete 100)
  792.  
  793.  
  794.  
  795. ; ------- FERTIG
  796.  
  797.  
  798.  
  799. (message (cat
  800.  
  801.         "\nInstallation of StormC is done.\n"
  802.  
  803.    "When the lines:\n" command1 "\nare not inserted in your Startup-Sequence or "
  804.  
  805.    "User-Startup, please do it by your own.\n\n"
  806.  
  807.    "\n\nBest wishes ... ")
  808.  
  809. )
  810.  
  811.